package com.azzcs.controller.config;

import com.azzcs.myrpc.client.RpcClient;
import com.azzcs.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: wzg
 * @Date: 2021/1/23 下午10:32
 */
@Configuration
public class RpcConfig {

    @Autowired
    private RpcClient rpcClient;

    @Bean
    public IUserService userService(){
        return rpcClient.build(IUserService.class);
    }
}
